#include "test.h"

//test::test()
//{
//    //构造函数里需要关联信号
//    m_socketClient = SocketClient::getInstance();
//      //关联读数据包信号
//    connect(m_socketClient, SIGNAL(dataZijianPacketReady(SocketPacket)),
//            this, SLOT(dataZijianPacketReady(SocketPacket)));
//}


//建立通信连接的写法
//bool connected = m_socketClient->isConnected();
//if(!connected)
//{
//    QHostAddress ip("192.168.0.140");
//    int port = 1234;
//    m_socketClient->connectTcpServer(ip, port);
//}




//发送自检命令，给send方法一个参数（设备ID）
//{
//    m_socketClient->sendZijianCmd("0001");
//}

//read直接给你一个字符串，数据格式为   设备ID；实验ID（这里没有，显示0000）；故障具体字符串
//void test::dataZijianPacketReady(SocketPacket packet)
//{
//    m_socketClient->analysisData(packet);
//}

